package com.fileshare.web.dao;

import com.fileshare.web.dao.base.SequenceGenerater;
import com.fileshare.web.entity.Article;
import org.springframework.stereotype.Component;

import java.util.List;

@Component
public interface ArticleRepository extends SequenceGenerater<Article> {
    @Override
    Article findBySeq(String seq);

    List<Article> findAllWithContent();

    List<Article> findArticles(int page, int limit);

    Article findArticle(String articleSeq);

    void save(Article article);

    void updateViews(Integer views, String articleSeq);

    List<Article> findByCategorySeq(String categorySeq);

    List<Article> findRelatedByCategorySeq(String categorySeq, Integer limit);
}
